<template>
    <div class="TabelNav">
        <div v-if="list">
            <div v-if="list.type==2">
                <template v-if="list.data.length>1">
                    <van-row>
                        <van-col v-for="item in list.data" :key="item.img.url" span="8">
                            <van-image style="transform: translate(-20%);" width="150%"  :src="item.img.url" @click="jump(item.url)" />
                        </van-col>
                    </van-row>
                </template>
                <template v-else>
                    <img :src="list.data[0].img.url" width="100%" alt="">
                </template>

            </div>

        </div>
    </div>
</template>

<script>
export default {
    props: {
        list: Object,
    },
    data() {
        return {
            rout: "",
        };
    },
    computed: {},
    methods: {
        jump(url) {
            if (this.rout != url) {
                let index = url.indexOf("activity/");
                let newUrl = url.slice(index + 9);
                this.$router.push("/activity" + newUrl);
            }
            this.rout = url;
        },
    },
};
</script>

<style lang="scss" scoped>
.TabelNav {
    padding: 0 0.18rem;
    .van-col {
        height: 2.1rem;
    }
}
</style>